Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS_MAVLink: don't learn a route to the broadcast component #14620

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

peterbarker
Copy link
Contributor

Using a component ID of 0 for your source is invalid according to
common.xml

However, some clients do use it.

This stops us learning a route to that client for the broadcast client
for our own system ID.

Copy link
Contributor

@amilcarlucas amilcarlucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

libraries/GCS_MAVLink/MAVLink_routing.cpp Outdated Show resolved Hide resolved
Using a component ID of 0 for your source is invalid according to
common.xml

However, some clients do use it.

This stops us learning a route to that client for the broadcast client
for our own system ID.
.... even if we've forwarded them to someone else.
@peterbarker
Copy link
Contributor Author

This PR fixes dataflash-over-mavlink on CubeOrange.

The second patch here was required as currently we don't process messages sent to the broadcast system if we've forwarded to any other system - which is wrong. It means if you connect a second GCS on a second telemetry link then we stop processing
messages sent to the broadcast system sent on a first telemetry link (e.g. a dataflash-over-mavlink start packet)

}
if (msg.sysid == mavlink_system.sysid &&
msg.compid == mavlink_system.compid) {
// don't learn routes to ourself. We know where we are.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be funnier with "We know who we are" :)

@lucasdemarchi lucasdemarchi self-assigned this Oct 13, 2020
@peterbarker
Copy link
Contributor Author

Marking this as DevCall in case @lucasdemarchi (owner) doesn't merge it before then :-)

@tridge tridge merged commit 7c8df47 into ArduPilot:master Oct 21, 2020
@peterbarker peterbarker deleted the pr/no-route-component branch October 26, 2020 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants